package com.cci.kangdao.dao;

import com.cci.kangdao.dao.model.AKeyLoginUserTokenT;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

/**
 * @author linjiankun
 * @date 2022/6/10 9:49
 */
@MapperScan
public interface AKeyLoginUserTokenDao {

    @Select("select * from AKeyLoginUserToken_T where UserId = #{userId} and Type = #{type} and Flag = 0")
    AKeyLoginUserTokenT getAKeyLoginUserTokenByUserId(@Param("userId")Long userId,@Param("type")Integer type);

    int insertSelective(AKeyLoginUserTokenT aKeyLoginUserTokenT);


    int updateSelective(AKeyLoginUserTokenT aKeyLoginUserTokenT);

    int deleteTokenByUserId(@Param("userId")Long userId,@Param("type")Integer type);
}
